import React, { useEffect, useMemo, useRef, useState } from 'react'
import {
  ProCard,
  ProDescriptions,
  ProTable,
  TableDropdown,
  ProFormText,
  ProForm,
  ProFormDigit,
  ProFormTextArea,
  ProFormDependency,
  ProFormSelect,
  PageLoading,
  ModalForm
} from '@ant-design/pro-components';
import { EditOutlined, HolderOutlined, FormOutlined, PlusOutlined, DeleteOutlined, RightOutlined, CloseOutlined, ArrowLeftOutlined } from '@ant-design/icons';
import {
  Tabs,
  Input,
  List,
  Avatar,
  Row,
  Col,
  Space,
  AutoComplete,
  Divider,
  Select,
  Button,
  message,
  Empty,
  Card,
  Popover,
  InputNumber,
  Image,
  Typography,
  Drawer,
  Modal,
  Table,
  Tooltip
} from 'antd'

import Menu from './components/menu';

import {
  reqPatientList,
  reqDetal,
  reqUpdate,
  reqPulseUpdate,
  reqPulseDetail,
  reqPulseList,
  reqQuestionTermList,

} from '@/services/basicConsultation';


// reqSeniorInquiryList,
import {
  reqPulseCalibrationList,
  reqTongueCalibrationList,
  reqDiagnosisTermList,
  reqDiagnosisTermListByGrade,
  reqSeniorInquiryList,
  reqSeniorInquiryUpdate,
  reqSymptomList,
  reqSymptomListByGrade,
  reqBaseBodyAcupointList
} from '@/services/firstConsultation';

import styles from './components/index.module.less'
import Patient from './components/patient';
import Consultation from '@/components/Consultation';
import AddModal from '@/components/Diagnosis/components/AddModal';
import WesternMedicine from '@/components/WesternMedicine';
import { getPatientDetail } from '@/services/register';
import MedicalRecord from '@/components/MedicalRecord';
import TongueCalibration from '@/components/TongueCalibration';
import PulseInfoCalibration from '@/components/PulseInfoCalibration';
import { history } from 'umi';


const Main = () => {

  const [isDetail, setIsDetail] = useState<boolean>(false);
  const [medicineCaseList, setMedicalCaseList] = useState<any>();
  const [blDate, setBlDate] = useState<any>();

  const [item, setItem] = useState<any>();
  // 当前问诊用户
  const [user, setUser] = useState<any>(null)
  // 当前用户问诊详情数据
  const [medicalCase, setMedicalCase] = useState<any>(null)
  const [patient, setPatient] = useState<any>(null);
  const [hisMedicalCase, setHisMedicalCase] = useState<any>(null);

  const [isWenzhen, setIsWenzhen] = useState<boolean>(false);
  const [isZhenduan, setIsZhenduan] = useState<boolean>(false);
  const [isKaifang, setIsKaifang] = useState<boolean>(false);
  const [isXiyaoKaifang, setIsXiyaoKaifang] = useState<boolean>(false);
  const [openBingli, setOpenBingli] = useState<boolean>(false);
  const [isShezhen, setIsShezhen] = useState<boolean>(false);
  const [isMaizhen, setIsMaizhen] = useState<boolean>(false);

  const [currentBlId, setCurrentBlId] = useState<string>("");
  const [openYaofang, setOpenYaofang] = useState<boolean>(false);

  const [zhiliaoFee, setZhiliaoFee] = useState<any>(0);
  const [pulseLeft, setPualseLeft] = useState<string>("常规脉");
  const [pulseRight, setPualseRight] = useState<string>("常规脉");

  async function handleShowZhenduanModal(bool: boolean, isUpUser: boolean) {
    if (isUpUser) {
      await getDetal(user?.id)
    }
    setIsZhenduan(bool)
  }

  function handleShezhen() {
    setIsShezhen(true);
  }

  function getPulseCalibrationName(data: any) {
    let tyPulseCalibrationName = data?.seniorInquiry?.tyPulseCalibrationName;
    if (tyPulseCalibrationName) {
      try {
        let left = "";
        let right = "";
        tyPulseCalibrationName = JSON.parse(tyPulseCalibrationName);
        tyPulseCalibrationName?.left?.map((pulse: any) => {
          left += "、" + pulse;
        });
        tyPulseCalibrationName?.right?.map((pulse: any) => {
          right += "、" + pulse;
        });
        setPualseLeft(left.substring(1));
        setPualseRight(right.substring(1));
      } catch (error) {
        setPualseLeft("常规脉");
        setPualseRight("常规脉");
      }
    } else {
      setPualseLeft("常规脉");
      setPualseRight("常规脉");
    }
  }

  function getZhiliaoFee(data: any) {
    let fee = 0.0;
    try {
      if (data?.westernMedicineList) {
        data?.westernMedicineList.map((westernMedicine: any) => {
          fee += westernMedicine?.originalPrice * westernMedicine?.quantity
        })
      }
    } catch (e) { }
    try {
      let medicineTake = data?.medicineTake;
      let packets = medicineTake?.packets;
      let quantity = medicineTake?.quantity;
      let totalPackage = quantity;//packets * quantity;
      if (data?.herbList) {
        data?.herbList.map((herb: any) => {
          fee += herb?.originalPrice * herb?.quantity * totalPackage
        })
      }
    } catch (e) { }
    setZhiliaoFee(fee.toFixed(2));
    return fee;
  }

  function getSheBiaoding(shezhen: any) {
    if (!shezhen) return "-";
    return shezhen.replace("[", "").replace("]", "").replace(/\"/g, "");
  }

  const gotoDetail = async (item: any) => {
    setIsDetail(true);
    setItem(item);
    setUser(item);
    await getDetal(item?.id)
    await getMedicineCaseList(item?.tyPatientId);
    //setUser(item)
    history.push({
      pathname: '/main/detail',
      query: {
        id: item?.id,
        tyPatientId: item?.tyPatientId
      }
    })
  }

  function back() {
    setIsDetail(false);
    setMedicalCase(null);
    setItem(null);
    setUser(null);
  }

  // 更新用户数据
  async function upDataUser() {
    await getDetal(user?.id)
  }

  // 病历信息详情(基础+高级问诊)
  async function getDetal(id: number | string) {
    try {
      const res = await reqDetal({
        id
      })
      console.log('病历信息详情 :>> ', res?.data);
      if (res?.resultCode == '00000000') {
        if (patient == null) {
          const patientRes = await getPatientDetail({ id: res?.data?.tyPatientId })
          if (patientRes?.resultCode == '00000000') {
            setPatient(patientRes?.data)
          }
        }

        // setData(res?.data?.result)
        let medicalCase = res?.data;
        // let projectList = medicalCase?.projectList;
        // if (projectList) {
        //   let quantity = projectList[0]?.quantity;
        //   setAcpconfirmnum(quantity);
        // } else {
        //   setAcpconfirmnum(0);
        // }
        setMedicalCase(medicalCase);

        Object.assign(medicalCase?.seniorInquiry, { "inquiryDesciption": "禁忌药:" + medicalCase?.tabooMedication + "," + "曾用药:" + medicalCase?.previouslyUsedMedication + "," + medicalCase?.medicalHistory })
        getZhiliaoFee(medicalCase);
        getPulseCalibrationName(medicalCase);

        setWenzhenData([<Typography.Text style={{ color: "#222", fontSize: 12 }}>病名：{medicalCase?.seniorInquiry?.tyIllnessName}</Typography.Text>,
        <Typography.Text style={{ color: "#222", fontSize: 12 }}>副病名:{medicalCase?.seniorInquiry?.assistantIllnessName}</Typography.Text>,
        <Typography.Text style={{ color: "#222", fontSize: 12 }}>症状：
          <Typography.Text style={{ color: "#f7b500", fontSize: 12, marginRight: "12px" }}>{medicalCase?.seniorInquiry?.diseaseSymptomatic}</Typography.Text>
          {/* <Typography.Text style={{color:"#f7b500",fontSize:12,marginRight:"12px"}}>小便难</Typography.Text>
          <Typography.Text style={{color:"#f7b500",fontSize:12,marginRight:"12px"}}>小便量少</Typography.Text>
          <Typography.Text style={{color:"#5bc1d0",fontSize:12,marginRight:"12px"}}>大便干燥</Typography.Text>
          <Typography.Text style={{color:"#5bc1d0",fontSize:12,marginRight:"12px"}}>大便溏散稀</Typography.Text> */}
        </Typography.Text>,
        <Row style={{ display: "flex", flexDirection: "column" }}>
          <Row>
            <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>脉：</Typography.Text></Col>
            <Col>
              <Row><Col><Typography.Text style={{ color: "#222", fontSize: 12, display: "block" }}>【 左手 】--</Typography.Text></Col></Row>
              <Row><Col><Typography.Text style={{ color: "#222", fontSize: 12, display: "block" }}>【 右手 】--</Typography.Text></Col></Row>
            </Col>
          </Row>
          <Row>
            <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>舌：{getSheBiaoding(medicalCase?.seniorInquiry?.tyTongueCalibrationName)}</Typography.Text></Col>
          </Row>
          <Row>
            <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>问诊：{medicalCase?.seniorInquiry?.inquiryDesciption}</Typography.Text></Col>
          </Row>
        </Row>]);

        let tyDiagnosisTermJson = JSON.parse(medicalCase?.seniorInquiry?.tyDiagnosisTermJson);
        let tyDiagnosisJson = tyDiagnosisTermJson?.tyDiagnosisJson;
        let messageJson = tyDiagnosisTermJson?.messageJson;
        let liujing = "";
        let bagang = "";
        let zang = "";
        let fu = "";
        let bingyinbingji = "";
        let qi = "";
        let xue = "";
        let jing = "";
        let ye = "";
        let xiexing = "";

        for (let i = 0; i < messageJson?.length; i++) {
          bingyinbingji += "," + messageJson[i]?.name;
        }

        for (let i = 0; i < tyDiagnosisJson?.length; i++) {
          if (tyDiagnosisJson[i]?.name == '六经') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              liujing += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '八纲') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              bagang += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '脏') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              zang += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '腑') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              fu += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '气') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              qi += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '血') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              xue += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '津') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              jing += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '液') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              ye += "," + child[j]?.name;
            }
          }
          if (tyDiagnosisJson[i]?.name == '邪') {
            let child = tyDiagnosisJson[i]?.child;
            for (let j = 0; j < child?.length; j++) {
              xiexing += "," + child[j]?.name;
            }
          }
        }

        liujing = liujing.substring(1);
        bagang = bagang.substring(1);
        zang = zang.substring(1);
        fu = fu.substring(1);
        bingyinbingji = bingyinbingji.substring(1);
        qi = qi.substring(1);
        xue = xue.substring(1);
        jing = jing.substring(1);
        ye = ye.substring(1);
        xiexing = xiexing.substring(1);


        setZhenduanData([
          <Row style={{ display: "flex", flexDirection: "column" }}>
            <Row>
              <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>六经：{liujing}</Typography.Text></Col>
            </Row>
            <Row>
              <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>八纲：{bagang}</Typography.Text></Col>
            </Row>
            <Row>
              <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>脏：{zang}</Typography.Text></Col>
            </Row>
            <Row>
              <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>腑：{fu}</Typography.Text></Col>
            </Row>
            <Row>
              <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>病因病机：{bingyinbingji}</Typography.Text></Col>
            </Row>
          </Row>,
          <Typography.Text style={{ color: "#222", fontSize: 12 }}>气血津液：
            <Typography.Text style={{ color: "#222", fontSize: 12, marginRight: "12px" }}>{qi}</Typography.Text>
            <Typography.Text style={{ color: "#222", fontSize: 12, marginRight: "12px" }}>{xue}</Typography.Text>
            <Typography.Text style={{ color: "#222", fontSize: 12, marginRight: "12px" }}>{jing}</Typography.Text>
            <Typography.Text style={{ color: "#222", fontSize: 12, marginRight: "12px" }}>{ye}</Typography.Text>
          </Typography.Text>,
          <Typography.Text style={{ color: "#222", fontSize: 12 }}>邪性：
            <Typography.Text style={{ color: "#222", fontSize: 12, marginRight: "12px" }}>{xiexing}</Typography.Text>
          </Typography.Text>,
        ]);

        let medicineTake = medicalCase?.medicineTake;

        setTjData([
          <Row style={{ width: "100%" }}>
            <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>服{medicineTake?.packets}，停{medicineTake?.administrationInterval}</Typography.Text></Col>
            <Col span={8} style={{ textAlign: "center" }}><Typography.Text style={{ color: "#222", fontSize: 12 }}>{medicineTake?.administrationTime}</Typography.Text></Col>
            <Col span={8} style={{ textAlign: "right" }}><Typography.Text style={{ color: "#222", fontSize: 12 }}>{medicineTake?.quantity}剂</Typography.Text></Col>
          </Row>,
          <>
            <Row style={{ width: "100%" }}>
              <Col span={24} style={{ textAlign: "center" }}><Typography.Text style={{ color: "#222", fontSize: 12, display: "inline-block", borderBottom: "2px solid rgb(145, 145, 145)" }}>{medicineTake?.tyBaseFormulaName}</Typography.Text></Col>
              <Col span={24} style={{ marginTop: "5px" }}>
                <Row>
                  {medicalCase?.herbList?.map((herb: any) => {
                    return <Col style={{ marginRight: "10px" }}><Typography.Text style={{ color: "#222", fontSize: 12 }}>{herb?.medicineName} {herb?.quantity} g</Typography.Text></Col>
                  })
                  }
                </Row>
              </Col>
            </Row>
          </>
        ])

        let xiyaoSource: any = [];

        medicalCase?.westernMedicineList?.map((item: any) => {
          xiyaoSource.push({
            key: item?.medicineId,
            name: item?.medicineName,
            // age: "艾倍得(速效)",
            // address: '0 IU',
            // ff:"早餐前"
            quantity: item?.quantity
          })
        })
        setXiyaodataSource(xiyaoSource);

      } else {
        message.error(`病历信息详情出错！${res?.message}`)
      }
    } catch (error: any) {
      message.error('病历信息详情出错！', error)
      console.log('病历信息详情出错！ :>> ', error);
    }
  }

  function getZhenduan(theMedicalCase: any, name: string) {
    try {
      let tyDiagnosisTermJson = JSON.parse(theMedicalCase?.tyDiagnosisTermJson);
      let tyDiagnosisJson = tyDiagnosisTermJson?.tyDiagnosisJson || {};
      let messageJson = tyDiagnosisTermJson?.messageJson || {};
      let liujingbagang = "";
      let bingyinbingji = "";

      if (name == '病因病机') {
        for (let i = 0; i < messageJson?.length; i++) {
          bingyinbingji += "," + messageJson[i]?.name;
        }
        bingyinbingji = bingyinbingji.substring(1);
        return bingyinbingji;
      }

      for (let i = 0; i < tyDiagnosisJson?.length; i++) {
        if (tyDiagnosisJson[i]?.name == name) {
          let child = tyDiagnosisJson[i]?.child;
          for (let j = 0; j < child?.length; j++) {
            liujingbagang += "," + child[j]?.name;
          }
        }
      }
      liujingbagang = liujingbagang.substring(1);
      return liujingbagang;
    } catch (e) {
      return "";
    }
  }

  function handleBingli(item: any) {
    setBlDate(item?.id);
    if (currentBlId != item?.id) {
      setOpenBingli(true);
      setCurrentBlId(item?.id);
    } else {
      setOpenBingli(!openBingli);
    }
    setHisMedicalCase(item)
  }

  async function getMedicineCaseList(tyPatientId) {
    try {
      const res = await reqSeniorInquiryList({
        pageNum: 1,
        pageSize: 10,
        tyPatientId: tyPatientId,
        // tyMedicalCaseId: user?.id
      })

      console.log('病历信息列表信息 :>> ', res?.data);
      if (res?.resultCode == '00000000') {
        setMedicalCaseList(res?.data?.result)
      } else {
        message.error(`病历信息列表信息出错！${res?.message}`)
      }
    } catch (error: any) {
      message.error('病历信息列表信息出错！', error)
      console.log('病历信息列表信息出错！ :>> ', error);
    }
  }

  const personData = [
    '分组：--',
    '取药方式：',
    '最近血压：',
    '最近血糖：',
    '用药特性：',
  ];

  const [wenzhenData, setWenzhenData] = useState<any>();

  const xiyaoData = [
    '暂无西药',
  ];

  const xbsData = [
    <Row style={{ display: "flex", flexDirection: "column" }}>
      <Row>
        <Col><Typography.Text style={{ color: "#5bc1d0", fontWeight: 600, fontSize: 12 }}>问诊</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>病名：	眩晕</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>脉：</Typography.Text></Col>
        <Col>
          <Row><Col><Typography.Text style={{ color: "#222", fontSize: 12, display: "block" }}>【 左手 】--</Typography.Text></Col></Row>
          <Row><Col><Typography.Text style={{ color: "#222", fontSize: 12, display: "block" }}>【 右手 】--</Typography.Text></Col></Row>
        </Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>舌：	--</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>症状：	其它，口干</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>其他：	--</Typography.Text></Col>
      </Row>
    </Row>,

    <Row style={{ display: "flex", flexDirection: "column" }}>
      <Row>
        <Col><Typography.Text style={{ color: "#5bc1d0", fontWeight: 600, fontSize: 12 }}>诊断</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>六经：阳明经</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>病因病机：--</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>气血津液：气滞，津亏</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>邪性：湿</Typography.Text></Col>
      </Row>
      <Row>
        <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>其他：	--</Typography.Text></Col>
      </Row>
    </Row>,
    <Row style={{ display: "flex", flexDirection: "column", width: "100%" }}>
      <Row>
        <Col><Typography.Text style={{ color: "#5bc1d0", fontWeight: 600, fontSize: 12 }}>处方</Typography.Text></Col>
      </Row>
      <Row >
        <Col span={8} ><Typography.Text style={{ color: "#222", fontSize: 12 }}>桂枝加芍药汤+百合加小柴胡汤(增、减)</Typography.Text></Col>
        <Col span={6} style={{ textAlign: "center" }}>
          <Tooltip placement="top" color="#fff" trigger="click" overlayInnerStyle={{ color: "#222", fontSize: "12px", padding: "10px 20px" }} title="人参片 10 g蝉蜕 10 g">
            <Typography.Text style={{ borderRadius: "100%", textAlign: "center", cursor: "pointer", lineHeight: "24px", display: "inline-block", width: "24px", height: "24px", fontSize: "12px", color: "#fff", background: "#5bc1d0", padding: "0", border: "none" }}>详</Typography.Text>
          </Tooltip>
        </Col>
        <Col span={6} >  <Typography.Text style={{ color: "#222", fontSize: 12 }}>早后 晚后</Typography.Text></Col>
        <Col span={4} style={{ textAlign: "right" }}><Typography.Text style={{ color: "#222", fontSize: 12 }}>6 剂</Typography.Text></Col>
      </Row>
      <Row style={{ borderTop: "1px solid rgb(247, 247, 247)", paddingTop: "4px" }}>
        <Col span={24}>
          <Row justify="space-around">
            <Col span={12}><Typography.Text style={{ color: "#888888", fontWeight: 600, fontSize: 12 }}>医生：解渤</Typography.Text></Col>
            <Col span={12} style={{ textAlign: "right" }}><Typography.Text style={{ color: "#888888", fontWeight: 600, fontSize: 12 }}>诊所：北京太一科技</Typography.Text></Col>
          </Row>
          <Row >
            <Col ><Typography.Text style={{ color: "#888888", fontWeight: 600, fontSize: 12 }}>时间：2022-02-23 20:00:20</Typography.Text></Col>
          </Row>
        </Col>
      </Row>
    </Row>

  ];

  const [tjData, setTjData] = useState<any>();//medicineTake

  const [zhenduanData, setZhenduanData] = useState<any>();

  const [xiyaodataSource, setXiyaodataSource] = useState<any>();

  // const xiyaodataSource = [
  //   {
  //     key: '1',
  //     name: '胰岛素',
  //     age: "艾倍得(速效)",
  //     address: '0 IU',
  //     ff:"早餐前"
  //   }
  // ];
  const xiyaocolumns = [
    {
      title: 'Key',
      dataIndex: 'key',
      key: 'key',
    },
    {
      title: '药名',
      dataIndex: 'name',
      key: 'name',
    },
    // {
    //   title: '用量',
    //   dataIndex: 'address',
    //   key: 'address',
    // },
    // {
    //   title: '方法',
    //   dataIndex: 'ff',
    //   key: 'ff',
    // },'
    {
      title: '数量',
      dataIndex: 'quantity',
      key: 'quantity'
    }
  ];

  // 更改高级问诊信息
  async function upDataInfo(params: object) {
    try {
      //debugger
      const res = await reqSeniorInquiryUpdate({
        id: medicalCase?.seniorInquiry?.id,
        ...params
      })

      console.log('更改高级问诊信息 :>> ', res?.data);
      if (res?.resultCode == '00000000') {
        // setData(res?.data?.result)
        await getDetal(medicalCase.id)
        message.success(`更改高级问诊信息成功`)
        handleIsWenzhen(false);
      } else {
        message.error(`更改高级问诊信息出错！${res?.message}`)
      }
    } catch (error: any) {
      message.error('更改高级问诊信息出错！', error)
      console.log('更改高级问诊信息出错！ :>> ', error);
    }
  }

  function getAge(birthday: any) {
    let age = '未知';
    try {
      var birthDayTime = new Date(birthday).getTime();
      //当前时间 毫秒
      var nowTime = new Date().getTime();
      //一年毫秒数(365 * 86400000 = 31536000000)
      age = Math.ceil((nowTime - birthDayTime) / 31536000000) + "岁";
    } catch (e) { }
    return age;
  }

  function dateFormat(dateStr: any, type: number) {
    let date = new Date(dateStr)
    if (type == 1) {
      return date.getDate();
    } else if (type == 2) {
      return (date.getMonth() + 1) + "/" + date.getFullYear();
    }
    return date;
  }

  function handleSubmit() {
    setOpenYaofang(true)
  }

  // 更改基础问诊信息
  async function onSubmit(params: object) {
    try {
      const res = await reqUpdate({
        id: medicalCase.id,
        illnessNameHistory: medicalCase.illnessNameHistory,
        basicInquiryJson: medicalCase.basicInquiryJson,
        tonguePic: medicalCase.tonguePic,
        reportPic: medicalCase.reportPic,
        medicalHistory: medicalCase.medicalHistory,
        ...params
      })

      console.log('更改问诊信息信息 :>> ', res?.data);
      if (res?.resultCode == '00000000') {
        // setData(res?.data?.result)
        //await getDetal(medicalCase.id)
        message.success(`更改问诊信息成功`)
        setOpenYaofang(false);
        setIsDetail(false);
      } else {
        message.error(`更改问诊信息出错！${res?.message}`)
      }
    } catch (error: any) {
      message.error('更改问诊信息出错！', error)
      console.log('更改问诊信息出错！ :>> ', error);
    }
  }


  // 重构问诊
  const handleIsWenzhen = (isopen: boolean) => {
    setIsWenzhen(isopen)
  }

  return (
    // <>
    //   {isDetail ?
    //     <div>
    //       <Row style={{ backgroundColor: 'white', height: 40, borderBottom: "1px solid rgb(242, 242, 242)", paddingLeft: 20 }} align="middle">
    //         <Col span={12}>  <Divider type="vertical" ></Divider> <Typography.Text style={{ color: "#222", fontWeight: 600, fontSize: 14 }}>问诊ID: {item?.id}</Typography.Text></Col>
    //         <Col span={10} style={{ textAlign: 'end', color: "#5bc1d0", fontSize: 14, fontWeight: 600 }}>治疗费用: {zhiliaoFee}元</Col>
    //       </Row>
    //       <Row style={{ backgroundColor: 'white', paddingBottom: 5, height: 40, paddingLeft: 20, borderBottom: '1px solid #f4f4f4' }} align="middle" >
    //         <Col span={12}>
    //           {/* <Button style={{color:"#222",minWidth:80,borderColor:"rgb(255, 255, 255)",background:"rgb(238, 238, 238)"}} size='small' icon={<EditOutlined />} onClick={()=>{message.warning('待开发')}}>现病史</Button>
    //     <Button size='small' style={{color:"#222",minWidth:80,borderColor:"rgb(255, 255, 255)",background:"rgb(238, 238, 238)"}} icon={<FormOutlined />} onClick={()=>{message.warning('待开发')}}>既往史</Button> */}

    //           {/* <Button size='small' style={{color:"#222",minWidth:80,borderColor:"rgb(255, 255, 255)",background:"rgb(238, 238, 238)"}} icon={<FormOutlined />} onClick={()=>{message.warning('待开发')}}>舌标定</Button> */}

    //         </Col>
    //         {/* <Col span={15}>
    //     <Button size='small' onClick={()=>{setIsDetail(false)}}>面</Button>
    //     <Button size='small' onClick={()=>{setIsDetail(false)}}>舌</Button>
    //     <Button size='small' onClick={()=>{setIsDetail(false)}}>其他</Button>
    //     </Col> */}
    //         <Col span={15}>
    //           <Button size='small' icon={<ArrowLeftOutlined />} onClick={() => { back() }}>返回</Button>
    //         </Col>
    //         <Col span={10} style={{ textAlign: 'end' }}>
    //           {/* <Button size='small' onClick={()=>{setIsDetail(false)}} disabled style={{color:"#222",minWidth:80,borderColor:"rgb(255, 255, 255)",background:"rgb(238, 238, 238)"}}>处方</Button> */}
    //           {/* <Button size='small' onClick={()=>{setIsDetail(false)}}>用药</Button> */}
    //           {/* <Button size='small' onClick={()=>{setIsDetail(false)}}>针灸</Button> */}
    //           {/* <Button size='small' onClick={()=>{setIsDetail(false)}}>理疗</Button> */}
    //         </Col>
    //       </Row>
    //       <Row>
    //         <Col span={1} style={{ backgroundColor: 'white', overflow: 'hidden' }} className={styles.wenzhenbox}>
    //           <Row>
    //             <Col span={18} style={{ borderBottom: '1px solid #000', textAlign: 'center', color: "#222", fontSize: 12, margin: "0 auto", lineHeight: "30px", position: 'relative' }}>病历</Col>
    //             {
    //               openBingli ?
    //                 <div style={{ position: 'fixed', left: 53, width: 400, padding: 30, zIndex: 900, border: '1px solid rgb(242, 242, 242)', overflowY: 'auto', backgroundColor: '#fff' }} className={styles.wenzhenbox}>
    //                   <div>
    //                     <div style={{ position: 'absolute', right: 20, top: 12, cursor: 'pointer' }} onClick={() => setOpenBingli(false)}><CloseOutlined></CloseOutlined></div>
    //                     <div>
    //                       <h3 style={{ fontSize: 12, fontWeight: 'bold' }}>病名</h3>
    //                       <p style={{ fontSize: 12 }}>
    //                         {hisMedicalCase?.tyIllnessName}
    //                       </p>
    //                     </div>
    //                     <Divider style={{ margin: '0 0 15px 0' }} />
    //                     <div>
    //                       <h3 style={{ fontSize: 12, fontWeight: 'bold' }}>副病名</h3>
    //                       <p style={{ fontSize: 12 }}>
    //                         {hisMedicalCase?.assistantIllnessName}
    //                       </p>
    //                     </div>
    //                     <Divider style={{ margin: '0 0 15px 0' }} />
    //                     <div>
    //                       <h3 style={{ fontSize: 12, fontWeight: 'bold' }}>六经/病因病机</h3>
    //                       <p style={{ fontSize: 12 }}>
    //                         六经：{getZhenduan(hisMedicalCase, '六经')}
    //                       </p>
    //                       <p style={{ fontSize: 12 }}>
    //                         病因病机：{getZhenduan(hisMedicalCase, '病因病机')}
    //                       </p>
    //                     </div>
    //                     <Divider style={{ margin: '0 0 15px 0' }} />
    //                     <div>
    //                       <h3 style={{ fontSize: 12, fontWeight: 'bold' }}>症状</h3>
    //                       <p style={{ fontSize: 12 }}>
    //                         {hisMedicalCase?.diseaseSymptomatic}
    //                       </p>
    //                     </div>
    //                     <Divider style={{ margin: '0 0 15px 0' }} />
    //                     <div>
    //                       <h3 style={{ fontSize: 12, fontWeight: 'bold' }}>气血津液</h3>
    //                       {
    //                         getZhenduan(hisMedicalCase, '气') + " " + getZhenduan(hisMedicalCase, '血')
    //                         + " " + getZhenduan(hisMedicalCase, '津') + " " + getZhenduan(hisMedicalCase, '液')
    //                         // hisMedicalCase?.tyDiagnosisJson?.map((item: any, index: number) => (
    //                         //   <div key={index}>
    //                         //     <p style={{fontSize:12}}>
    //                         //       <b>{item?.name}：</b>
    //                         //       <div>
    //                         //         {
    //                         //           item?.child?.map((li: any, i: number) => (
    //                         //             <span key={i}>{index != 0 && '、'}{li?.name}</span>
    //                         //           ))
    //                         //         }
    //                         //       </div>
    //                         //     </p>
    //                         //   </div>
    //                         // ))
    //                       }
    //                     </div>
    //                     <Divider style={{ margin: '0 0 15px 0' }} />
    //                     <div>
    //                       <h3 style={{ fontSize: 12, fontWeight: 'bold' }}>邪性</h3>
    //                       <p style={{ fontSize: 12 }}>
    //                         {getZhenduan(hisMedicalCase, '邪')}
    //                       </p>
    //                     </div>
    //                     {/* <Divider style={{margin:'0 0 15px 0'}} />
    //               <div>
    //                 <h3 style={{fontSize:12,fontWeight:'bold'}}>处方</h3>
    //                 <p style={{fontSize:12}}>
    //                 0099-自拟方，早后 晚后，6 剂
    //                 </p>
    //                 <p style={{fontSize:12}}>
    //                 醋五味子 10000 g青蒿 100000000 g
    //                 </p>
    //                 <p style={{fontSize:12}}>
    //                 医生：解渤
    //                 </p>
    //               </div> */}
    //                   </div>
    //                 </div>
    //                 : null
    //             }
    //           </Row>
    //           <div style={{ overflowY: 'auto' }} className={styles.wenzhenbox}>
    //             {
    //               medicineCaseList?.map((item: any, index: number) => {
    //                 return <Row style={{ borderBottom: '1px solid rgb(248, 248, 248)' }} >
    //                   <Col span={24} style={{ padding: "12px 0", cursor: "pointer", background: blDate == item?.id ? '#5bc1d0' : '' }} onClick={() => { handleBingli(item) }}>
    //                     <Row style={{ textAlign: 'center', color: 'red', fontSize: 18, fontWeight: 700 }}>
    //                       <Col span={24} style={{ fontSize: 18, color: blDate == item?.id ? '#fff' : '#222' }}>{dateFormat(item?.gmtCreate, 1)}</Col>
    //                     </Row>
    //                     <Row>
    //                       <Col span={24} style={{ textAlign: 'center', color: blDate == item?.id ? '#fff' : '#888', fontSize: 12 }}>
    //                         {dateFormat(item?.gmtCreate, 2)}
    //                       </Col>
    //                     </Row>
    //                   </Col>
    //                 </Row>
    //               })
    //             }
    //           </div>
    //         </Col>
    //         <Col span={18} style={{ padding: '15px 15px', overflowY: 'auto' }} className={styles.wenzhenbox}>
    //           {/* <Row style={{padding:"16px 0"}}>
    //         <Col span={2} style={{color:"#5bc1d0",fontSize:"12px",display:"flex",alignItems:"center"}} >新增</Col>
    //         <Col span={2} style={{color:"#f7b500",fontSize:"12px",display:"flex",alignItems:"center"}}>前次（已愈）</Col>
    //         <Col span={2} style={{color:"#222",fontSize:"12px",display:"flex",alignItems:"center"}}>  均有</Col>
    //       </Row> */}
    //           <Row gutter={12}>
    //             <Col span={12}>
    //               <Card headStyle={{ background: "#5bc1d0", color: "#fff", fontSize: 12 }} type="inner" title="问诊" extra={<a href="#" onClick={() => handleIsWenzhen(true)}><EditOutlined style={{ color: "#fff" }} /></a>}>
    //                 <List
    //                   size="small"
    //                   dataSource={wenzhenData}
    //                   renderItem={item => <List.Item style={{ borderBottom: "2px dotted rgb(228, 228, 228)" }}>{item}</List.Item>}
    //                 />
    //               </Card>
    //               <Card type="inner" style={{ marginTop: 10 }} headStyle={{ background: "#e6e6e6", color: "#000000d9", fontSize: "12px" }} title="照片">
    //                 <Row gutter={8}>
    //                   <Col style={{ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center" }}>
    //                     <Image width={80} height={80} style={{ marginRight: "10px", borderRadius: "4px" }} src={medicalCase?.tonguePic} />
    //                     <Typography.Text style={{ fontSize: 12, color: "#222", marginTop: "10px", cursor: 'pointer' }} onClick={() => handleShezhen()}>舌（标定）</Typography.Text>
    //                     {/* <Button size='small' onClick={()=>{}}>舌标定</Button> */}
    //                   </Col>
    //                   <Col style={{ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center" }}>
    //                     <Image width={80} height={80} style={{ marginRight: "10px", borderRadius: "4px" }} src={medicalCase?.reportPic} />
    //                     <Typography.Text style={{ fontSize: 12, color: "#222", marginTop: "10px" }}>报告</Typography.Text>
    //                   </Col>
    //                 </Row>
    //               </Card>

    //               <Card type="inner" style={{ marginTop: 10 }} headStyle={{ background: "#5bc1d0", color: "#fff", fontSize: "12px !important" }} title="西药详情"
    //                 extra={
    //                   <>
    //                     {/* <a href="#" onClick={()=>{}}>
    //                   <Typography.Text style={{fontSize:12,color:"#fff",marginRight:10}}>更多</Typography.Text>
    //               </a>  */}
    //                     {/* <a href="#" onClick={()=>setIsZhenduan(true)}>
    //                 <EditOutlined style={{color:"#fff"}}/>
    //               </a> */}

    //                     <WesternMedicine
    //                       user={medicalCase}
    //                       type={"1"}
    //                       upDataInfo={upDataInfo}
    //                       upDataUser={upDataUser}
    //                     />

    //                   </>
    //                 }>
    //                 <Table bordered={false} pagination={false} dataSource={xiyaodataSource} columns={xiyaocolumns} />
    //               </Card>

    //               {/* <Card type="inner" style={{marginTop:10}} headStyle={{background:"#5bc1d0",color:"#fff",fontSize:"12px !important"}}  title="上次提问">
    //               <Typography.Text style={{color:"#222",fontSize:12}}>暂无提问</Typography.Text>
    //           </Card> */}

    //               {/* <Card type="inner" style={{marginTop:10}} title="现病史" headStyle={{background:"#e6e6e6",color:"#000000d9",fontSize:"12px !important"}}>
    //              <List
    //                 size="small"
    //                 dataSource={xbsData}
    //                 renderItem={item => <List.Item style={{borderBottom:"2px dotted rgb(228, 228, 228)"}}>{item}</List.Item>}
    //               />
    //           </Card> */}
    //             </Col>
    //             <Col span={12}>
    //               <Card type="inner" title="诊断" headStyle={{ background: "#5bc1d0", color: "#fff", fontSize: 12 }} extra={<a href="#" onClick={() => setIsZhenduan(true)}><EditOutlined style={{ color: "#fff" }} /></a>}>
    //                 <List
    //                   size="small"
    //                   dataSource={zhenduanData}
    //                   renderItem={item => <List.Item style={{ borderBottom: "2px dotted rgb(228, 228, 228)" }}>{item}</List.Item>}
    //                 />
    //               </Card>

    //               {/* <Card type="inner" style={{marginTop:10}} title="病因病机智能开方" headStyle={{background:"#f7b500",color:"#fff",fontSize:12}}>
    //              <>
    //                <Row justify="space-between" style={{marginBottom:"10px",cursor:"pointer"}} align="middle">
    //                  <Col style={{display:"flex",flexDirection:"column"}}>
    //                    <Typography.Text style={{display:"inline-block",fontSize:13,color:"#000000d9",fontWeight:600}}>桂枝加附子汤</Typography.Text>
    //                    <Typography.Text style={{display:"inline-block",color:"#222",fontSize:12}}>+熟附片(先),+桂枝,+生白芍,+甘草,+生姜,+大枣</Typography.Text>
    //                  </Col>
    //                  <Col><RightOutlined /></Col>
    //                </Row> 
    //              </>
    //           </Card> */}

    //               <Card type="inner" style={{ marginTop: 10 }} headStyle={{ background: "#5bc1d0", color: "#fff", fontSize: 12 }} title="散方汤剂" extra={
    //                 <>
    //                   {/* <a href="#" onClick={()=>setIsKaifang(true)}><PlusOutlined style={{color:"#fff",marginRight:"10px"}}/></a> */}
    //                   <WesternMedicine
    //                     user={medicalCase}
    //                     type={"2"}
    //                     upDataInfo={upDataInfo}
    //                     upDataUser={upDataUser}
    //                   />
    //                   {/* <a href="#" onClick={()=>setIsKaifang(true)}><DeleteOutlined style={{color:"#fff"}}/></a> */}
    //                 </>
    //               }>
    //                 <List
    //                   size="small"
    //                   dataSource={tjData}
    //                   renderItem={item => <List.Item style={{ borderBottom: "2px dotted rgb(228, 228, 228)" }}>{item}</List.Item>}
    //                 />
    //               </Card>


    //             </Col>
    //           </Row>
    //         </Col>
    //         <Col span={5} style={{ backgroundColor: 'white', padding: "16px 6px 16px 10px" }}>
    //           <Row><Typography.Text style={{ color: "#222", fontSize: 12, fontWeight: 600 }}>个人信息</Typography.Text></Row>
    //           <Row gutter={3}>
    //             <Col span={8}>
    //               <Image src={patient?.avatar}></Image>
    //             </Col>
    //             <Col span={16}>
    //               <Row style={{ fontSize: 14, fontWeight: 600 }}>
    //                 <Col span={20}>{user?.tyPatientName}</Col>
    //                 <Col span={4}>{user?.gender == 0 ? '男' : '女'}</Col>
    //               </Row>
    //               <Row>
    //                 <Col span={10}>
    //                   {user?.birthday}
    //                 </Col>
    //                 <Col span={14}>
    //                   {getAge(user?.birthday)}
    //                 </Col>
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row style={{ borderBottom: "1px solid rgb(237, 237, 237)", padding: "4px 0" }}>
    //             <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>所在城市：</Typography.Text></Col>
    //             <Col span={16}>
    //               <Row justify="space-between">
    //                 <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>{patient?.province}{patient?.city}</Typography.Text></Col>
    //                 {/* <Col><RightOutlined style={{fontSize:"12px"}}/></Col> */}
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row style={{ borderBottom: "1px solid rgb(237, 237, 237)", padding: "4px 0" }}>
    //             <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>分组：</Typography.Text></Col>
    //             <Col span={16}>
    //               <Row justify="space-between">
    //                 <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>--</Typography.Text></Col>
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row style={{ borderBottom: "1px solid rgb(237, 237, 237)", padding: "4px 0" }}>
    //             <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>取药方式：</Typography.Text></Col>
    //             <Col span={16}>
    //               <Row justify="space-between">
    //                 <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>{patient?.receiveMethod == 1 ? '自取' : '邮寄'}</Typography.Text></Col>
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row style={{ borderBottom: "1px solid rgb(237, 237, 237)", padding: "4px 0" }}>
    //             <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>最近血压：</Typography.Text></Col>
    //             <Col span={16}>
    //               <Row justify="space-between">
    //                 <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>	--/--, --</Typography.Text></Col>
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row style={{ borderBottom: "1px solid rgb(237, 237, 237)", padding: "4px 0" }}>
    //             <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>最近血糖：</Typography.Text></Col>
    //             <Col span={16}>
    //               <Row justify="space-between">
    //                 <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}></Typography.Text></Col>
    //                 <Col><RightOutlined style={{ fontSize: "12px" }} /></Col>
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row style={{ borderBottom: "1px solid rgb(237, 237, 237)", padding: "4px 0" }}>
    //             <Col span={8}><Typography.Text style={{ color: "#222", fontSize: 12 }}>用药特性：</Typography.Text></Col>
    //             <Col span={16}>
    //               <Row justify="space-between">
    //                 <Col><Typography.Text style={{ color: "#222", fontSize: 12 }}>无</Typography.Text></Col>
    //                 <Col><EditOutlined style={{ fontSize: "12px" }} /></Col>
    //               </Row>
    //             </Col>
    //           </Row>
    //           <Row gutter={8} justify="space-between" style={{ padding: "4px 0", cursor: 'pointer' }} onClick={() => setIsMaizhen(true)}>
    //             <Col span={12}>
    //               <EditOutlined style={{ fontSize: "12px" }} />
    //               <Typography.Text style={{ color: "#222", fontSize: 12, margin: "0 4px" }}>左</Typography.Text>
    //               <Typography.Text style={{ borderRadius: 4, color: "#222", marginLeft: "4px", lineHeight: "22px", fontSize: 12, display: "inline-block", width: "80px", textAlign: "center", background: "rgb(238, 238, 238)" }}>{pulseLeft}</Typography.Text>
    //             </Col>
    //             <Col span={12} style={{ textAlign: "right" }}>
    //               <EditOutlined style={{ fontSize: "12px" }} />
    //               <Typography.Text style={{ color: "#222", fontSize: 12, margin: "0 4px" }}>右</Typography.Text>
    //               <Typography.Text style={{ borderRadius: 4, color: "#222", marginLeft: "4px", lineHeight: "22px", fontSize: 12, display: "inline-block", width: "80px", textAlign: "center", background: "rgb(238, 238, 238)" }}>{pulseRight}</Typography.Text>
    //             </Col>
    //           </Row>
    //           <Row>

    //           </Row>
    //         </Col>
    //       </Row>

    //       <Row style={{ position: "fixed", bottom: 0, right: "22%" }}>
    //         <Col span={24} style={{ textAlign: 'end' }}>
    //           <Button onClick={() => { handleSubmit() }} style={{ width: 150, borderRadius: '15px', background: "#5bc1d0", color: "#fff" }}>完成诊疗</Button>
    //           <Row>
    //             <Col span={24} style={{ textAlign: 'center' }}><Typography.Text style={{ color: 'red', fontSize: 12 }}>*点击后，不能再开药</Typography.Text></Col>
    //           </Row>
    //         </Col>
    //       </Row>
    //     </div>
    //     :

    //   }

    //   {/* //问诊弹框 */}
    //   {/* <Modal
    //     title="问诊"
    //     centered
    //     open={isWenzhen}
    //     onOk={() => setIsWenzhen(false)}
    //     onCancel={() => setIsWenzhen(false)}
    //     width={1000}
    //   // footer={[]}
    //   >
    //     <Consultation
    //       user={medicalCase}
    //       upDataInfo={upDataInfo}
    //       consultationReadonly={false}
    //     />
    //   </Modal> */}
    //   <Consultation
    //     isOpen={isWenzhen}
    //     onCancel={handleIsWenzhen}
    //     user={medicalCase}
    //     upDataInfo={upDataInfo}
    //     consultationReadonly={false}
    //   />

    //   {
    //     // 诊断弹框
    //     <AddModal
    //       isShow={isZhenduan}
    //       handleShowModal={handleShowZhenduanModal}
    //       user={medicalCase}
    //       upDataInfo={upDataInfo}
    //     />
    //   }
    //   {
    //     // 中药开方
    //     <Modal title="开方"
    //       centered
    //       open={isKaifang}
    //       onOk={() => setIsKaifang(false)}
    //       onCancel={() => setIsKaifang(false)}
    //       width={1000}>
    //       <WesternMedicine
    //         user={medicalCase}
    //         type={2}
    //         upDataInfo={upDataInfo}
    //         upDataUser={upDataUser}
    //       />
    //     </Modal>
    //   }

    //   {/* // 西药开方 */}
    //   <Modal title="开方"
    //     centered
    //     open={isXiyaoKaifang}
    //     onOk={() => setIsXiyaoKaifang(false)}
    //     onCancel={() => setIsXiyaoKaifang(false)}
    //     width={1000}>
    //     <WesternMedicine
    //       user={medicalCase}
    //       type={1}
    //       upDataInfo={upDataInfo}
    //       upDataUser={upDataUser}
    //     />
    //   </Modal>
    //   {/* <WesternMedicineModal /> */}


    //   {
    //     // 药房
    //     <Modal title="药房"
    //       centered
    //       open={openYaofang}
    //       onOk={() => onSubmit({ "status": 3 })}
    //       onCancel={() => setOpenYaofang(false)}
    //       width={1000}>
    //       暂无配置其他药房<br></br>
    //       确认提交到药房吗？
    //     </Modal>
    //   }
    //   {
    //     <Modal
    //       title="舌诊标定"
    //       centered
    //       open={isShezhen}
    //       onOk={() => setIsShezhen(false)}
    //       onCancel={() => setIsShezhen(false)}
    //       width={1000}
    //       footer={[]}
    //     >
    //       <TongueCalibration readonly={false} user={medicalCase} upDataInfo={upDataInfo} />
    //     </Modal>
    //   }
    //   {
    //     <Modal
    //       title="脉诊标定"
    //       centered
    //       open={isMaizhen}
    //       onOk={() => setIsMaizhen(false)}
    //       onCancel={() => setIsMaizhen(false)}
    //       width={1000}
    //       footer={[]}
    //     >
    //       <PulseInfoCalibration readonly={false} user={medicalCase} upDataInfo={upDataInfo} />
    //     </Modal>
    //   }
    // </>

    <>
      <Menu gotoDetail={gotoDetail}></Menu>
    </>
  )
}

export default Main;